<template>
  <div id="app">
    <fullscreen ref="fullscreen" @change="fullscreenChange">
      <router-view/>
    </fullscreen>
  </div>
</template>

<script>
export default {
  name: 'App',
  mounted(){
     this.$root.$on('fullscreentoggle',()=>{
        this.$refs.fullscreen.toggle();
     })
  },
  methods:{
    // 捕获是否在全屏状态切换
    fullscreenChange(val){
      console.log(val)
    }
  }
 
}
</script>

<style>
*{
  margin:0;
  padding: 0;
  list-style: none;
}
a{
  color: inherit;
  text-decoration: none;
}
</style>
